Failure: Ole-Object

Hi!

 

I get a failure during my DXL script. I have attached this failure as a picture. Interesting is, that if I start the script within a module I get no errors; but if I start the script within a folder with modules in it, I cannot specify the path of the Excel template. I specify this path with a DXL GUI.

The script exports modules from Doors to Excel and loads a GUI, in which you can specify baseline, path to the template, view and so on.

I have also attached the script. This script differs if you paste the code into "dxl bearbeiten" within in open module or in a folder with modules in it. My task is to program a Excel script which exports all modules within a folder. The script export from only a open module is running flawless.

Thanks for your help!


tobi_mehrl - Tue May 19 02:27:23 EDT 2015

Re: Failure: Ole-Object
llandale - Wed May 27 19:26:15 EDT 2015

Getting late, didn't get very far.

I don't read German.  But the error seems to be a warning, do you want to continue like this?  Perhaps say "yes".   It would help if you said the symptom of the error.  if you proceed when prompted, what are the results that are not right?  Only the last module gets exported for example?

You have the one dialog box generated in two separate functions almost identical.  Better to have just one and nuance the dialog when needed:
     if (!null mCurr) ...

 

line 1834 excelDoneOLE() (close the OLE file) seems to get called from line 3925; which I think is INSIDE your loop of modules.

line 4976 make sure the "type" of the item is a "Formal".  Otherwise you may try to open sub-folders and get unpleasant errors.
 if (type(i) != "Formal") then continue
ditto 4954


line 3943 Checking "current Module" in a callback.  Is it not likely it changed
  while the dialog was open?

I think this use of "current Module" in several places in the code is your problem.  At least have a global variable "Module mCurr" and put the value in that.  I'm suspecting 'current' is getting changed -- such as if you open a module with a default view that opens other modules -- blowing "current" out of the water.

 

5175 move this destroy after the "block" a few statements previous.
833 don't bother "creating" this; set it to null

1672 iniExcelOLE() called from 3846,   seems to always populate the same file and the same sheet (2).
 I'm wondering if you want each module to go to subsequent sheets?  If so, use a counter
 at line 3850 instead of XLOLEExportSheetNumber

Sorry not complete.

-louie